<%-- 
    Document   : addProduct
    Created on : Jun 12, 2012, 4:23:08 PM
    Author     : Owner
--%>

<%@include file="/jsp/adminTop.jsp" %>

<html>
    <head>        
        <title>Add Product</title>        
    </head>
    <body>
        <div class="clear"></div>
        <table cellspacing="5px" width="100%" align="center">
            <tr>
                <td>
                    <table cellspacing="5px" width="100%" align="center">
                        <tr>
                            <td style="vertical-align: top;" width="20%">
                                <%@include file="/jsp/right.jsp" %>
                            </td>
                            <td>                &nbsp;            </td>
                            <td style="vertical-align: top;" width="80%">
                                <div class="page-title"><h1>Manage Products</h1></div>
                                <table border="1" cellspacing="10px" align="center">
                                    <tr>
                                        <td><h2>Add Product</h2></td>
                                        <td>[<a href="./product.do?action=showManageProducts">List Products</a>]
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <html:form action="/product" method="post" enctype="multipart/form-data">
                                                <table border="1" cellspacing="10px" align="center">
                                                    <tr><td colspan="2">Product Details</td></tr>
                                                    <tr>
                                                        <td>Product Name:</td>
                                                        <td><html:text property="productName"/></td>
                                                    </tr>
                                                    <tr><td colspan="2"><html:errors property="errProductName"/></td></tr>
                                                    <tr>
                                                        <td> Title :</td>
                                                        <td><html:text property="productTitle"/></td>
                                                    </tr>
                                                    <tr><td colspan="2"> <html:errors property="errPropertyTitle"/></td></tr>
                                                    <tr>
                                                        <td>Long Description:</td>
                                                        <td><html:textarea property="productDescription"/></td>
                                                    </tr>
                                                    <tr><td colspan="2"><html:errors property="errProductDesc"/></td></tr>
                                                    <tr>
                                                        <td>Price:</td>
                                                        <td><html:text property="productPrice"/> </td>
                                                    </tr>
                                                    <tr><td colspan="2"><html:errors property="errProductPrice"/></td></tr>
                                                    <tr>
                                                        <td>Discount:</td>
                                                        <td>Discount Price:</td>
                                                    </tr>
                                                    <tr>
                                                        <td><html:text property="productDiscount"/></td>
                                                        <td><html:text property="productDiscountPrice"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div class="chkproducttaxable">
                                                                <html:checkbox  property="productTaxable" onchange="javascript:togglediv('taxValue');" value="ON"/> Taxable Product
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div id="taxValue" style="display: none">
                                                                Tax Value: <br/><html:text  value="0" property="productTaxValue"/>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr><td colspan="2"><html:errors property="errProductTaxValue"/> </td></tr>
                                                    <tr>
                                                        <td>Items in Stock:</td>
                                                        <td><html:text property="productQty"/></td>
                                                    </tr>
                                                    <tr><td colspan="2"><html:errors property="errProductQty"/> </td></tr>
                                                    <tr>
                                                        <td>Small Image:</td>
                                                        <td><html:file property="productSmallImage" accept="image/*" /></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"><html:errors property="errProductSmallImage"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Large Image:</td>
                                                        <td><html:file property="productLargeImage" accept="image/*" /></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"><html:errors property="errProductLargeImage"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Brand:</td>
                                                        <td><html:select property="productBrandId">
                                                                <html:option value="0">--Brands--</html:option>
                                                                <html:options collection="brandList" property="key" labelProperty="value"/>
                                                            </html:select>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"> <html:errors property="errProductBrand"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Parent Category</td>
                                                        <td><html:select property="productCategoryId">
                                                                <html:option value="0">--Select--</html:option>
                                                                <html:options collection="parentCategList" property="key" labelProperty="value"/>
                                                            </html:select>  </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"><html:errors property="errProductCategory"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Status:</td>
                                                        <td><html:select property="productStatusId">
                                                                <html:option value="0">--Status--</html:option>
                                                                <html:options collection="statusList" property="key" labelProperty="value"/>
                                                            </html:select></td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div id="errdividproduct" >
                                                                <span id="errspanidproduct"></span>
                                                                <html:errors property="errProduct"/>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"><a onclick="javascript:return validateProduct('./product.do?action=saveProduct','ProductBean')">
                                                                <img src="images/save.png" onmouseout="src='images/save.png'" onmouseover="src='images/save-hover.png'" alt="Save Product" /></a></td>
                                                    </tr>
                                                </table>
                                            </html:form>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td><%@include file="/jsp/footer.jsp" %></td>
            </tr>
        </table>




    </body>
</html>
